x86/hvm: introduce functions for HVMOP_get/set_param allowance checks
authorPaul Durrant <paul.durrant@citrix.com>
Thu, 7 May 2015 13:07:57 +0000 (15:07 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 7 May 2015 13:07:57 +0000 (15:07 +0200)
commitec9f99e1be5b05988b50b9fd6145e242c2daa5a9
tree90bfee43393b217519e55b0790e6b27dbae48d48
parent43a5c7bd4e38b876bd3a4f05af03bc0c5f54233e
x86/hvm: introduce functions for HVMOP_get/set_param allowance checks

Some parameters can only (validly) be set once. Some should not be set
by a guest for its own domain, and others must not be set since they
require the domain to be paused. Consolidate these checks, along with
the XSM check, in a new hvm_allow_set_param() function for clarity.

Also, introduce hvm_allow_get_param() for similar reasons.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/hvm/hvm.c